<?php

date_default_timezone_set('America/Argentina/Buenos_Aires');
set_time_limit(70); 

switch ($_SERVER['SERVER_NAME']) {
    case "cavdp01": case "cavdp01.mpd.gov.ar": $servidor = 'prod';
        break;
    case "cavdp02": case "cavdp02.mpd.gov.ar": $servidor = 'pre';
        break;
    case "cavdp03": case "cavdp03.mpd.gov.ar": $servidor = 'test';
        break;
    case "cavsis01": case "cavsis01.mpd.gov.ar": 
    case "sies": case "sies.mpd.gov.ar": $servidor = 'prod_callao';
        break;
    case "cavsis02": case "cavsis02.mpd.gov.ar": $servidor = 'preprod_callao';
        break;	
    default: $servidor = 'desa';
        break;
}

if ($servidor == 'desa') {

    define("DB_HOST", "127.0.0.1");
    define("DB_USER", "root");
    define("DB_PASS", "");
    define("DB_NAME", "bd_spge");
    define("GLOBAL_PLUGINS", "../GLOBAL_PLUGINS");
	// error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
	
	//error_reporting(E_ALL);
    
} elseif ($servidor == 'test') {

    define("DB_HOST", "cavdp03");
    define("DB_USER", "root");
    define("DB_PASS", "lietome");
    define("DB_NAME", "bd_sies_test");
	define("GLOBAL_PLUGINS", "../GLOBAL_PLUGINS");
	//error_reporting(E_ERROR | E_WARNING | E_PARSE );
    
} elseif ($servidor == 'pre') {

    define("DB_HOST", "localhost");
    define("DB_USER", "root");
    define("DB_PASS", "lietome");
    define("DB_NAME", "bd_sies_pre");
	define("GLOBAL_PLUGINS", "../GLOBAL_PLUGINS");
	
	//error_reporting(E_ERROR | E_WARNING | E_PARSE );
} elseif ($servidor == 'prod') {

    define("DB_HOST", "localhost");
    define("DB_USER", "root");
    define("DB_PASS", "239d2f65c7");
    define("DB_NAME", "bd_sies_prod_");
	define("GLOBAL_PLUGINS", "http://cavsis02.mpd.gov.ar/GLOBAL_PLUGINS");
	error_reporting(0);
} elseif ($servidor == 'prod_callao') {

    // define("DB_HOST", "cavsis01"); //tmb tarda demasiado
	define("DB_HOST", "127.0.0.1"); //esto funciona mil veces mas rapido
    define("DB_USER", "root");
    define("DB_PASS", "");
    define("DB_NAME", "bd_sies_prod");
	define("GLOBAL_PLUGINS", "http://cavsis01.mpd.gov.ar/GLOBAL_PLUGINS");
	error_reporting(0);
} elseif ($servidor == 'preprod_callao') {

    // define("DB_HOST", "cavsis02"); //tarda demasiado
    // define("DB_HOST", "cavsis02.mpd.gov.ar"); //tarda demasiado
    define("DB_HOST", "127.0.0.1"); //super rapido
    define("DB_USER", "root");
    define("DB_PASS", "");
    define("DB_NAME", "bd_sies_stress");
	define("GLOBAL_PLUGINS", "../GLOBAL_PLUGINS");	
	error_reporting(0);
}

define("INACTIVIDAD", 60*60); //segundos
//define("TEST"," TESTING");

if(isset($_REQUEST['getTimeout'])){
    echo INACTIVIDAD;   
}
define("MESA_DGN",580);
define("CONCURSO",30);


// die(GLOBAL_PLUGINS);
?>